import sublime, sublime_plugin,os,sys,shutil

class xcopysyncCommand(sublime_plugin.TextCommand):
	def run(self, edit):
		self.view.run_command('save')
		globals()['settings'] = sublime.load_settings('DefaultDoC.sublime-settings')
		xcopyPath = settings.get('xcopyPath', None)
		print(xcopyPath)
		retval = os.getcwd()
		os.chdir(xcopyPath)
		bat = os.path.join(xcopyPath,'copyAll.bat');
		print(bat)
		if os.path.isfile(bat):
			os.system('start '+bat);
		os.chdir(retval)
